LOCAL_SRC_DIR = $(shell pwd)

LINK    = @echo linking $@ && mips-linux-gnu-g++
GCC     = @echo compiling $@ && mips-linux-gnu-g++ 
GC      = @echo compiling $@ && mips-linux-gnu-gcc
STRIP   = @echo compiling $@ && mips-linux-gnu-strip
AR      = @echo generating static library $@ && ar -crv


USR_LIB_DIR = /usr/mips/lib
USR_INC_DIR = /usr/mips/include

FLAGS   = -g -W -w -Wall -fPIC -std=c++11 -Wno-unused-parameter -DMIPS
FLAGS   += -mnan=2008 -mabs=2008 -Wall -Os -march=mips32r2 -flax-vector-conversions -muclibc


GCCFLAGS = 
DEFINES = 
HEADER  = -I./ -I$(USR_INC_DIR) 
LIBS    = -L./ -L$(USR_LIB_DIR)  

LINKFLAGS =  -DDEBUG

CURRENT_TIME   = $(shell date "+%Y%m%d%H%M%S")

LIBS    += -pthread -lcrypto -lssl

SOURCE_FILES :=\
		main.cpp\


PROJECTNAME = HuaweiIotGenerator

TARGET = main

all: $(SOURCE_FILES)
	$(LINK) $(FLAGS) $(LINKFLAGS) -o ${PROJECTNAME}.out $^ $(LIBS) ${HEADER}
clean:
	rm -rf *.o *.out 
del:
	rm -rf *
